//
//  CheckUserLogin.m
//  SinceLe
//
//  Created by 李祎 on 15/11/13.
//  Copyright © 2015年 李元喜. All rights reserved.
//

#import "CheckUserLogin.h"

@implementation CheckUserLogin



#pragma mark --- 存储登录状态
+(void)userIsLogin{
    NSUserDefaults* user = [NSUserDefaults standardUserDefaults];
    [user setObject:@"YES" forKey:@"login"];
}

#pragma mark --- 存储退出登录状态
+(void)userOutLogin{
    NSUserDefaults* user = [NSUserDefaults standardUserDefaults];
    [user setObject:@"NO" forKey:@"login"];
}

#pragma mark --- 检测是否登录
+(BOOL)checkUserLogin{
    NSUserDefaults* user = [NSUserDefaults standardUserDefaults];
    if ([[user objectForKey:@"login"] isEqualToString:@"YES"]) {
        //登录
        return YES;
    }else{
        //没登录
        return NO;
    }
}

@end
